Repository navigation
96 b spline - #97
96 b spline#97
Conversation
Add traced vector and matrix B-spline evaluation, preserve extrapolation semantics, and update stencil AD rules and regression coverage. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Add 12 tests covering: Reactant Enzyme gradient through CubicBSplinePlan (vector + matrix), Reactant Enzyme gradient through stencil evaluation, Float32 and ForwardDiff Dual plan support, matrix plan extrapolation policies, and Reactant CubicBSpline with non-uniform knots. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Replace scalar band substitution with an affine scan so Reactant plans remain dynamic and differentiable while substantially reducing vector execution cost. Add deterministic solve, shape, Float32, and Enzyme regression coverage plus the performance investigation record. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Register the existing B-spline ChainRules rules with Mooncake and add plan-specific Akima and cubic-spline pullbacks. This removes large generic reverse-mode tapes from prepared vector and matrix plans. Add dense-plan, plain-Julia benchmark, JET, and DifferentiationInterface coverage. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Prepare fixed-grid Reactant B-spline plans as a single dense interpolation operator instead of silently falling back to the affine scan. This cuts matrix runtime and compilation substantially while retaining the scan for direct coefficient solves and guarding excessive operator storage. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Derive the not-a-knot basis exclusively from interpolation sites and make endpoint clamping the default extrapolation behavior. Remove unsupported custom-knot API branches, tests, and obsolete reference fixtures while retaining explicit strict and zero extrapolation policies. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Keep host B-spline plans lean by constructing dense interpolation operators only during Reactant adaptation. Remove the obsolete threshold and sentinel state, and require dense-plan Enzyme gradients to pass without the old failure fallback. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Advance the minor version for the new cubic B-spline interpolation API and its Julia, AD, and Reactant support. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #97 +/- ##
===========================================
- Coverage 99.13% 95.65% -3.48%
===========================================
Files 13 15 +2
Lines 1852 3456 +1604
===========================================
+ Hits 1836 3306 +1470
- Misses 16 150 +134 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Ensure exported spline and plan helpers propagate site and query derivatives consistently across ChainRules, Mooncake, and Reactant while keeping dense-plan preparation bounded and tested. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
AirspeedVelocity creates a separate environment and does not inherit benchmark/Project.toml, so its extra packages must include the imported Reactant dependency. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
|
Fixed the reproduced benchmark-environment failure in The patch changes only the workflow. YAML/import-contract checks passed, and the complete benchmark entry point loaded successfully with CPU Reactant and the The Computer Scientist is independently reviewing the full B-spline PR at the new head. New-head test and benchmark CI runs are being tracked. All pre-existing local work was restored and hash-verified after the branch change. PR remains open and unmerged. |
Restore complete plan cotangents, handle structured inputs and scalar activity, and correct affine scan composition. Add public-path regressions and repair benchmark baseline handling. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
|
Pushed review repairs at 1bceac5. Final normal Pkg.test: 1993/1993 passed, including complete geometry/field cotangents, range/view and scalar-activity cases, dynamic Reactant scalar queries, custom-basis affine solves, and prepared-gradient reuse. Local suite used Mooncake 0.5.24 / Reactant 0.2.232; independent re-review on newer dependencies and the merged target is now running. Performance was measured separately on matched dependencies and the same pinned efficiency core, with measured temperatures 53–72 C. A first generic-AD fix was rejected for a 7x cubic-plan gradient regression and replaced by a complete native pullback. Large-query vector gradients are now +3.3% minimum (+5.4% median); the matrix case is not slower in this run. The small 40-query case retains a measured +2.7 microseconds and +12.6 KB cost for previously discarded geometry cotangents. This is an explicit maintainer tradeoff, not automatic performance approval. Other spline paths are essentially unchanged. Benchmark provisioning/baseline handling is repaired without disabling head coverage. Raw-head background benchmark ratios versus develop include intervening Neff changes and are not isolated B-spline performance effects. All PRs remain unmerged. |
Remove temporary focused dispatch branches that conflict with develop while preserving every unconditional full-suite include. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
|
Final follow-up head: af79449. Removed only the temporary focused-test selector wrapper, which conflicted with develop’s Neff selectors. The default full-suite body is byte-identical to the 1993-test validated version; every new test remains unconditional. A read-only merge-tree check now combines the current develop and this head cleanly, retaining the Neff and B-spline test paths. No branch or PR merge was performed. Independent re-review and fresh CI are running on the final head. |
|
Independent re-review completed: correctness approved at af79449. All four original public-API blockers are closed, with no new blocking correctness finding. Verified on Julia 1.12.6 / Mooncake 0.5.63 / Reactant 0.2.290 / Enzyme 0.13.215:
Scope caveats: the unchanged, unexported raw solve bridge still fails Mooncake structured cotangents for view RHS inputs; supported exported spline/plan/bspline_coefficients APIs pass. This is a documented nonblocking follow-up. Performance evidence is AutoMooncake-only, not Zygote or whole-merged-tree certification. The small-plan +2.707 microseconds / +12568 bytes tradeoff remains explicitly for maintainer acceptance. Fresh GitHub platform CI remains incomplete, so this is correctness approval, NOT a merge-readiness claim. Nothing merged. |
Benchmark Results (Julia v1.10)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia v1.11)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia v1.12)Time benchmarks
Memory benchmarks
|
|
Final platform CI is fully successful at af79449: push test matrix, pull-request test matrix, and all benchmark jobs passed. All nine PR combinations of Julia 1.10/1.11/1.12 and Linux/Windows/macOS passed. The modern merged-target Ubuntu log confirms Mooncake 0.5.63 / Reactant 0.2.292 and 4361/4361 tests passed, supplementing independent validation on Reactant 0.2.290. The correctness repair and CI verification are complete. Independent correctness approval, the small Mooncake plan-gradient performance tradeoff, and the nonblocking unexported raw-solver/view limitation remain as documented. No Zygote or whole-merge performance certification is claimed. The PR remains open and unmerged; green workflows alone do not override repository review/protection state. |
|
Additional local reproduction from the new Claude review confirms a separate plan-buffer ownership bug at af79449: after building CubicBSplinePlan(x,xq), mutating the caller-owned floating-point xq or x buffers leaves the cached forward operator unchanged, but the Zygote pullback re-reads the changed coordinates. For x=0:6, xq=[0.5,2.5,4.5], u=sin.(x), loss=sum(abs2,plan(u)), the original gradient agrees with ForwardDiff to 6.7e-16; xq+=0.25 produces 39.9% relative-L2 gradient error with exactly unchanged primal/ForwardDiff gradient. A separate interior-sites +=0.05 case gives 6.1% error. No discrepancy is claimed for unmutated grids, and Mooncake mutation behavior has not yet been measured. This is not fixed by the current analytic-neutrino API change on develop. It needs a scoped ownership/frozen-stencil repair and regression coverage before my final merge recommendation for this PR. No merge performed. |
Exploit guarded band structure to roughly halve batched solve time while preserving generic fallbacks and transpose semantics. Include frozen fixtures, AD regression tests, paired benchmarks and review evidence documenting the existing Akima failures and remaining harness issues. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Reuse cached factors and stream geometry reductions while preserving derivative and nonfinite contracts. Add unified set_threads configuration with regression tests, reference grids, and qualified benchmark reports. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Closes #96